¡ÅѺ˹éÒËÅÑ¡
 

ª¹Ô´¢éÍÁÙÅã¹ÀÒÉÒ Java

Primitive Data Types   ª¹Ô´¢Í§¢éÍÁÙž×é¹°Ò¹
Class Types   ª¹Ô´¢Í§¢éÍÁÙÅ·Õè¶èÒ·ʹÁÒ¡¨Ò¡¤ÅÒÊ ËÃ×Í interface
Array Types   ª¹Ô´¢Í§¢éÍÁÙÅ·Õèà»ç¹ÍÒÃìàÃÂì ËÃ×Í¢éÍÁÙÅà»ç¹ªØ´æ

¢éÍÁÙŪ¹Ô´ Primitive Data Types

ª¹Ô´¢éÍÁÙÅ

ÊÓËÃѺ

¤èÒ·Õèà»ç¹ä»ä´é

byte

µÑÇàÅ¢¨Ó¹Ç¹àµçÁàÅç¡æ ãªé¾×é¹·Õèà¡çºà¾Õ§á¤è 1 亵ì

-128 ¶Ö§ 127

short

µÑÇàÅ¢¨Ó¹Ç¹àµçÁ (ãªé¾×é¹·Õèà¡çº 16 ºÔµ ËÃ×Í 2 亵ì)

-32,768 ¶Ö§ 32,767

int

µÑÇàÅ¢¨Ó¹Ç¹àµçÁ·ÑèÇä» (ãªé¾×é¹·Õèà¡çº 32 ºÔµ ËÃ×Í 4 亵ì)

-2,147,483 ¶Ö§ 2,147,483,647

long

µÑÇàÅ¢¨Ó¹Ç¹àµçÁ¢¹Ò´ãË­è (ãªé¾×é¹·Õèà¡çº 64 ºÔµ ËÃ×Í 8 亵ì)

-9,223,372,036,845,775,808 ¶Ö§
9,223,372,036,845,775,807

float

µÑÇàÅ¢·È¹ÔÂÁ·ÑèÇä» (ãªé¾×é¹·Õèà¡çº 32 ºÔµ ËÃ×Í 4 亵ì)

1.4e-45 ¶Ö§ 3.4028235e+38

double

µÑÇàÅ¢·È¹ÔÂÁ¢¹Ò´ãË­è (ãªé¾×é¹·Õèà¡çº 64 ºÔµ ËÃ×Í 8 亵ì)

4.9e-324 ¶Ö§1.7976931348623157e+308

char

µÑÇÍÑ¡É÷ءª¹Ô´ µÒÁÁҵðҹ 16-bit Unicode

µÑÇÍÑ¡ÉõèÒ§æ

boolean

¤èÒ¤ÇÒÁà»ç¹¨ÃÔ§·Ò§µÃáР(ãªé¾×é¹·Õèà¡çº 1 ºÔµ)

ÁÕ 2 ¤èÒà·èÒ¹Ñ鹤×Í true ¡Ñº false

 

¨Ñ´¡ÒâéÍÁÙÅ´éǵÑÇ´Óà¹Ô¹¡ÒÃ

µÑÇ´Óà¹Ô¹¡Òà (Operator) ·Ó˹éÒ·Õè¨Ñ´¡Òà áÅÐàÃÒàÃÕ¡µÑÇá»Ã·Õè·Ó§Ò¹ÃèÇÁ¡ÑºµÑÇ´Óà¹Ô¹¡ÒÃÇèÒ Operand

˹éҶѴä»